import 'package:FlutterStudy/demo/mine/Timage.dart';
import 'package:flutter/material.dart';

class CircleImage extends StatefulWidget {
  double width;

  String url;

  double height;
  double radius;

  BoxBorder? mBorder;

  CircleImage({
    required this.width,
    required this.url,
    required this.height,
    required this.radius,
    this.mBorder,
  });

  @override
  _CircleImageState createState() {
    return _CircleImageState();
  }
}

class _CircleImageState extends State<CircleImage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return  Container(
      child: ClipOval( child: TImage(widget.url, widget.width, widget.height),) ,
      decoration: BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(widget.radius)),
        border: widget.mBorder,
      ),
    );

    /* return CircleAvatar(
      backgroundImage: const NetworkImage(
        'https://img1.baidu.com/it/u=2172818577,3783888802&fm=253&app=138&f=JPEG?w=800&h=1422',
      ),
      radius: 30,
      child: Container(
        decoration: const BoxDecoration(


            borderRadius: BorderRadius.all(Radius.circular(30)),
            border: Border.fromBorderSide(BorderSide(color: Colors.white,
              width: 2,))
        ),
      ),
    );*/
  }
}
